﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace RecommenderSystem
{
    public delegate void ButtonLogInEventHandler(string userName);
    public partial class AddNewUser : Form
    {
        //event when the button set user is clicked
        public event ButtonLogInEventHandler ButtonClicked;
        public AddNewUser()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            //raise the event and pass the arguments
            if (ButtonClicked != null)
            {
                ButtonClicked(textBoxUser.Text);
            }
            this.Close();
        }
    }
}
